#include <stdio.h>
int main() {
    int a, b;
    while (scanf("%d %d", &a, &b) != EOF) { 
        int i = 0;
        int count = 0;
        for (i = 0; i < 32; i++)
        {
            int k = (a >> i) & 1;
            int f = (b >> i) & 1;
            if ((k ^ f) == 1)
                count++;
        }
        printf("%d", count);
    }
    return 0;
}